<?php

class UserProfileBase extends CActiveRecord
{
	/**
	 * The followings are the available columns in table 'User_Profiles':
	 * @var double $Id
	 * @var double $UserId
	 * @var string $Gender
	 * @var string $Nationality
	 * @var string $MaritalStatus
	 * @var string $Birthday
	 * @var string $Address1
	 * @var string $Address2
	 * @var integer $LocationId
	 * @var string $CMND
	 * @var string $Phone
	 * @var string $Mobile
	 * @var string $YIM
	 * @var string $GoogleIM
	 * @var string $Skype
	 * @var string $Avatar1
	 * @var string $Avatar2
	 * @var string $Avatar3
	 */

	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className='UserProfile')
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'user_profiles';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('UserId, Gender, Nationality, MaritalStatus, Birthday, Address1, Mobile', 'required'),
			array('UserId', 'numerical'),
			array('Nationality', 'length', 'max'=>128),
			array('Address1, Address2, Avatar1, Avatar2, Avatar3', 'length', 'max'=>100),
			array('SocialId, Phone, Mobile, YIM, GoogleIM, Skype', 'length', 'max'=>30),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'Id' => 'Id',
			'UserId' => 'User',
			'Gender' => 'Gender',
			'Nationality' => 'Nationality',
			'MaritalStatus' => 'Marital Status',
			'Birthday' => 'Birthday',
			'Address1' => 'Address1',
			'Address2' => 'Address2',
			'SocialId' => 'SocialId',
			'Phone' => 'Phone',
			'Mobile' => 'Mobile',
			'YIM' => 'Yim',
			'GoogleIM' => 'Google Im',
			'Skype' => 'Skype',
			'Avatar1' => 'Avatar1',
			'Avatar2' => 'Avatar2',
			'Avatar3' => 'Avatar3',
		);
	}
}